package web_report

import "peilian-api/app/global/databases/tables"

type IWebReport interface {
	GetTotalScore() float64
	GetGeneralData() *ScoreChart
	GetGuideData() (interface{}, error)
	GetVocationalData() (interface{}, error)
	GetInterviewScore() (int, error)
	SetCharacterData(q *tables.RealQues) error
	GetPersonalityData() (interface{}, error)
	GetScoreOverView() (interface{}, error)
	GetSlotValueObj() *SlotValue
}

type AllData struct {
	UserImgUrl        string          `json:"userImgUrl"`         // 用户头像
	InterviewScore    int             `json:"score"`              // 报告总分
	UserName          string          `json:"username"`           // 姓名
	Major             string          `json:"major"`              // 训练职业
	Time              string          `json:"time"`               // 训练日期
	Duration          string          `json:"duration"`           // 训练时长
	VocationalAbility interface{}     `json:"professionalData"`   // 职业能力解析
	InterviewState    *InterviewState `json:"interviewStateData"` // 面试状态分析
	Guide             interface{}     `json:"guide"`              // 面试指导
	Personality       interface{}     `json:"personality"`        // 大五人格测评
	Type              string          `json:"type"`               // 报告类型: web/pdf/custom
	CareerId          uint            `json:"career_id"`
	UserId            uint            `json:"user_id"`
	ScoreOverView     interface{}     `json:"scoreOverView"` // 评分总览
}

type ScoreOverView struct {
	ProfessionalQuality int `json:"professionalQuality"` // 职业素养得分
	ExpressiveScore     int `json:"expressiveScore"`     //语言表述能力
	EmphasisScore       int `json:"emphasisScore"`
	LogicScore          int `json:"logicScore"`
}

type Personality struct {
	ChartData []*ChartData `json:"chartData"`
	Insight   []string     `json:"insight"`
	WorkMode  []*WorkMode  `json:"workMode"`
}

type WorkMode struct {
	Name    string `json:"name"`
	Source1 string `json:"source1"`
	Source2 string `json:"source2"`
}

type ChartData struct {
	Title string `json:"title"`
	Score int    `json:"score"`
}

type CommonGuide struct {
	Instruction string      `json:"instruction"`
	Performance string      `json:"performance"`
	Promotion   string      `json:"promotion"`
	Glm2Suggest interface{} `json:"glm2Suggest"`
}

type Guide struct {
	MajorPromotion        string      `json:"majorPromotion"`
	ProjectExpression     string      `json:"projectExpression"`
	AccomplishmentDisplay string      `json:"accomplishmentDisplay"`
	Glm2Suggest           interface{} `json:"glm2Suggest"`
	MajorPromotionScore   int         `json:"majorPromotionScore"`
	UniversalAbilityScore int         `json:"universalAbilityScore"`
}

type InterviewState struct {
	ExpressiveAbility *Expressive `json:"expressiveAbility"`
	Performance       *ChartInfo  `json:"performance"`
	Confidence        *ChartInfo  `json:"confidence"`
}

type Expressive struct {
	Score      int        `json:"score"`
	Evaluation string     `json:"evaluation"`
	Fluency    *ChartInfo `json:"fluency"`
	Intonation *ChartInfo `json:"intonation"`
	Emphasis   *ScoreInfo `json:"emphasis"`
	Logic      *ScoreInfo `json:"logic"`
}

type ChartInfo struct {
	ChartData  []float64 `json:"chartData"`
	Evaluation string    `json:"evaluation"`
}

type ScoreInfo struct {
	Score      int    `json:"score"`
	Evaluation string `json:"evaluation"`
}

type ProfessionalData struct {
	Professional      *ScoreChart    `json:"professional"`
	GeneralPurpose    *ScoreChart    `json:"generalPurpose"`
	InstrumentalSkill []string       `json:"instrumentalSkill"`
	PersonalTrait     []LabelValue   `json:"personalTrait"`
	Experience        *Experience    `json:"experience"`
	OtherBrightSpot   []LabelValue   `json:"otherBrightSpot"`
	OccupationMap     *OccupationMap `json:"occupationMap"`
}

type OccupationMap struct {
	ProfessionalAbility []LabelValue `json:"professionalAbility"`
	UniversalAbility    []LabelValue `json:"universalAbility"`
}

type Experience struct {
	Advantage []LabelValue `json:"advantage"`
	Promoted  []LabelValue `json:"promoted"`
}

type ScoreChart struct {
	Score     int          `json:"score"`
	ChartData []LabelValue `json:"chartsData"`
}

type LabelValue struct {
	Label string `json:"label"`
	Value int    `json:"value"`
}

type WrapAskGlm struct {
	Message string `json:"message"` // 适配启昌代码
}

type AskGlm struct {
	AppId     string     `json:"app_id"`
	QueryType string     `json:"query_type"`
	UserId    string     `json:"user_id"`
	PromptMap *PromptMap `json:"prompt_map"`
}

type PromptMap struct {
	Job        string `json:"job"`
	ItvHistory string `json:"itv_history"`
	Ability    string `json:"ability"`
}

type AskGlmResp struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    struct {
		Status string `json:"status"`
	} `json:"data"`
}

type GetGlmResultResp struct {
	*AskGlmResp
	Data *GlmResult `json:"data"`
}

type GlmResult struct {
	Status  interface{} `json:"status"`
	ResText string      `json:"res_text"`
}

type CareerRecommendResp struct {
	*AskGlmResp
	Data [][]interface{} `json:"data"`
}
